﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace Ocean.His.MedicalInsurance.Tool.Models
{
    /// <summary>
    /// 结算信息
    /// </summary>
    [DataContract]
    public class SI2101SetlInfo
    {
        /// <summary>
        /// 就诊ID
        /// </summary>
        [DataMember(Name = "mdtrt_id")]
        public string MdtrtId { get; set; }

        /// <summary>
        /// 人员编号
        /// </summary>
        [DataMember(Name = "psn_no")]
        public string PsnNo { get; set; }

        /// <summary>
        /// 人员姓名
        /// </summary>
        [DataMember(Name = "psn_name")]
        public string PsnName { get; set; }

        /// <summary>
        /// 人员证件类型
        /// </summary>
        [DataMember(Name = "psn_cert_type")]
        public string PsnCertType { get; set; }

        /// <summary>
        /// 证件号码
        /// </summary>
        [DataMember(Name = "certno")]
        public string Certno { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        [DataMember(Name = "gend")]
        public string Gend { get; set; }

        /// <summary>
        /// 民族
        /// </summary>
        [DataMember(Name = "naty")]
        public string Naty { get; set; }

        /// <summary>
        /// 出生日期
        /// </summary>
        [DataMember(Name = "brdy")]
        public string Brdy { get; set; }

        /// <summary>
        /// 年龄
        /// </summary>
        [DataMember(Name = "age")]
        public string Age { get; set; }

        /// <summary>
        /// 险种类型
        /// </summary>
        [DataMember(Name = "insutype")]
        public string Insutype { get; set; }

        /// <summary>
        /// 人员类别
        /// </summary>
        [DataMember(Name = "psn_type")]
        public string PsnType { get; set; }

        /// <summary>
        /// 公务员标志
        /// </summary>
        [DataMember(Name = "cvlserv_flag")]
        public string CvlservFlag { get; set; }

        /// <summary>
        /// 结算时间
        /// </summary>
        [DataMember(Name = "setl_time")]
        public string SetlTime { get; set; }

        /// <summary>
        /// 就诊凭证类型
        /// </summary>
        [DataMember(Name = "mdtrt_cert_type")]
        public string MdtrtCertType { get; set; }

        /// <summary>
        /// 医疗类别
        /// </summary>
        [DataMember(Name = "med_type")]
        public string MedType { get; set; }

        /// <summary>
        /// 医疗费总额
        /// </summary>
        [DataMember(Name = "medfee_sumamt")]
        public decimal MedfeeSumamt { get; set; }

        /// <summary>
        /// 全自费金额
        /// </summary>
        [DataMember(Name = "fulamt_ownpay_amt")]
        public decimal FulamtOwnpayAmt { get; set; }

        /// <summary>
        /// 超限价自费费用
        /// </summary>
        [DataMember(Name = "overlmt_selfpay")]
        public decimal OverlmtSelfpay { get; set; }

        /// <summary>
        /// 先行自付金额
        /// </summary>
        [DataMember(Name = "preselfpay_amt")]
        public decimal PreselfpayAmt { get; set; }

        /// <summary>
        /// 符合政策范围金额
        /// </summary>
        [DataMember(Name = "inscp_scp_amt")]
        public decimal? InscpScpAmt { get; set; }

        /// <summary>
        /// 实际支付起付线
        /// </summary>
        [DataMember(Name = "act_pay_dedc")]
        public decimal ActPayDedc { get; set; }

        /// <summary>
        /// 基本医疗保险统筹基金支出
        /// </summary>
        [DataMember(Name = "hifp_pay")]
        public decimal HifpPay { get; set; }

        /// <summary>
        /// 基本医疗保险统筹基金支付比例
        /// </summary>
        [DataMember(Name = "pool_prop_selfpay")]
        public decimal PoolPropSelfpay { get; set; }

        /// <summary>
        /// 公务员医疗补助资金支出
        /// </summary>
        [DataMember(Name = "cvlserv_pay")]
        public decimal CvlservPay { get; set; }

        /// <summary>
        /// 企业补充医疗保险基金支出
        /// </summary>
        [DataMember(Name = "hifes_pay")]
        public decimal HifesPay { get; set; }

        /// <summary>
        /// 居民大病保险资金支出
        /// </summary>
        [DataMember(Name = "hifmi_pay")]
        public decimal HifmiPay { get; set; }

        /// <summary>
        /// 职工大额医疗费用补助基金支出
        /// </summary>
        [DataMember(Name = "hifob_pay")]
        public decimal HifobPay { get; set; }

        /// <summary>
        /// 医疗救助基金支出
        /// </summary>
        [DataMember(Name = "maf_pay")]
        public decimal MafPay { get; set; }

        /// <summary>
        /// 其他支出
        /// </summary>
        [DataMember(Name = "oth_pay")]
        public decimal OthPay { get; set; }

        /// <summary>
        /// 基金支付总额
        /// </summary>
        [DataMember(Name = "fund_pay_sumamt")]
        public decimal FundPaySumamt { get; set; }

        /// <summary>
        /// 个人负担总金额
        /// </summary>
        [DataMember(Name = "psn_part_amt")]
        public decimal PsnPartAmt { get; set; }

        /// <summary>
        /// 个人账户支出
        /// </summary>
        [DataMember(Name = "acct_pay")]
        public decimal AcctPay { get; set; }

        /// <summary>
        /// 个人现金支出
        /// </summary>
        [DataMember(Name = "psn_cash_pay")]
        public decimal PsnCashPay { get; set; }

        /// <summary>
        /// 余额
        /// </summary>
        [DataMember(Name = "balc")]
        public decimal Balc { get; set; }

        /// <summary>
        /// 个人账户共济支付金额
        /// </summary>
        [DataMember(Name = "acct_mulaid_pay")]
        public decimal? AcctMulaidPay { get; set; }

        /// <summary>
        /// 医药机构结算ID
        /// </summary>
        [DataMember(Name = "medins_setl_id")]
        public string MedinsSetlId { get; set; }

        /// <summary>
        /// 清算经办机构
        /// </summary>
        [DataMember(Name = "clr_optins")]
        public string ClrOptins { get; set; }

        /// <summary>
        /// 清算方式
        /// </summary>
        [DataMember(Name = "clr_way")]
        public string ClrWay { get; set; }

        /// <summary>
        /// 清算类别
        /// </summary>
        [DataMember(Name = "clr_type")]
        public string ClrType { get; set; }

        /// <summary>
        /// 字段扩展
        /// </summary>
        [DataMember(Name = "expContent")]
        public string ExpContent { get; set; }
    }

    /// <summary>
    /// 结算基金分项信息
    /// </summary>
    [DataContract]
    public class SI2101SetlDetail
    {
        /// <summary>
        /// 基金支付类型
        /// </summary>
        [DataMember(Name = "fund_pay_type")]
        public string FundPayType { get; set; }

        /// <summary>
        /// 符合政策范围金额
        /// </summary>
        [DataMember(Name = "inscp_scp_amt")]
        public decimal? InscpScpAmt { get; set; }

        /// <summary>
        /// 本次可支付限额金额
        /// </summary>
        [DataMember(Name = "crt_payb_lmt_amt")]
        public decimal? CrtPaybLmtAmt { get; set; }

        /// <summary>
        /// 基金支付金额
        /// </summary>
        [DataMember(Name = "fund_payamt")]
        public decimal FundPayamt { get; set; }

        /// <summary>
        /// 基金支付类型名称
        /// </summary>
        [DataMember(Name = "fund_pay_type_name")]
        public string FundPayTypeName { get; set; }

        /// <summary>
        /// 结算过程信息
        /// </summary>
        [DataMember(Name = "setl_proc_info")]
        public string SetlProcInfo { get; set; }
    }

    /// <summary>
    /// 明细分割信息
    /// </summary>
    [DataContract]
    public class SI2101DetlCutInfo
    {
        /// <summary>
        /// 费用明细流水号
        /// </summary>
        [DataMember(Name = "feedetl_sn")]
        public string FeedetlSn { get; set; }

        /// <summary>
        /// 明细项目费用总额
        /// </summary>
        [DataMember(Name = "det_item_fee_sumamt")]
        public decimal DetItemFeeSumamt { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        [DataMember(Name = "cnt")]
        public decimal Cnt { get; set; }

        /// <summary>
        /// 单价
        /// </summary>
        [DataMember(Name = "pric")]
        public decimal Pric { get; set; }

        /// <summary>
        /// 定价上限金额
        /// </summary>
        [DataMember(Name = "pric_uplmt_amt")]
        public decimal PricUplmtAmt { get; set; }

        /// <summary>
        /// 自付比例
        /// </summary>
        [DataMember(Name = "selfpay_prop")]
        public decimal SelfpayProp { get; set; }

        /// <summary>
        /// 全自费金额
        /// </summary>
        [DataMember(Name = "fulamt_ownpay_amt")]
        public decimal FulamtOwnpayAmt { get; set; }

        /// <summary>
        /// 超限价金额
        /// </summary>
        [DataMember(Name = "overlmt_amt")]
        public decimal OverlmtAmt { get; set; }

        /// <summary>
        /// 先行自付金额
        /// </summary>
        [DataMember(Name = "preselfpay_amt")]
        public decimal PreselfpayAmt { get; set; }

        /// <summary>
        /// 符合政策范围金额
        /// </summary>
        [DataMember(Name = "inscp_scp_amt")]
        public decimal? InscpScpAmt { get; set; }

        /// <summary>
        /// 收费项目等级
        /// </summary>
        [DataMember(Name = "chrgitm_lv")]
        public string ChrgitmLv { get; set; }

        /// <summary>
        /// 医疗收费项目类别
        /// </summary>
        [DataMember(Name = "med_chrgitm_type")]
        public string MedChrgitmType { get; set; }

        /// <summary>
        /// 基本药物标志
        /// </summary>
        [DataMember(Name = "bas_medn_flag")]
        public string BasMednFlag { get; set; }

        /// <summary>
        /// 医保谈判药品标志
        /// </summary>
        [DataMember(Name = "hi_nego_drug_flag")]
        public string HiNegoDrugFlag { get; set; }

        /// <summary>
        /// 儿童用药标志
        /// </summary>
        [DataMember(Name = "chld_medc_flag")]
        public string ChldMedcFlag { get; set; }

        /// <summary>
        /// 目录特项标志
        /// </summary>
        [DataMember(Name = "list_sp_item_flag")]
        public string ListSpItemFlag { get; set; }

        /// <summary>
        /// 直报标志
        /// </summary>
        [DataMember(Name = "drt_reim_flag")]
        public string DrtReimFlag { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [DataMember(Name = "memo")]
        public string Memo { get; set; }
    }

    [DataContract]
    public class SI2101ResponseModel
    {
        [DataMember(Name = "setlinfo")]
        public SI2101SetlInfo SetlInfo { get; set; }

        [DataMember(Name = "setldetail")]
        public List<SI2101SetlDetail> SetlDetail { get; set; }

        [DataMember(Name = "detlcutinfo")]
        public List<SI2101DetlCutInfo> DetlCutInfo { get; set; }
    }
}
